<template>
	<div class="grade">
		<view class="greenBg"></view>
		<view class="whiteBg" v-for="item in grade" :key="item.id">
			<view class="boxTitle">维修时间：{{item.startDate}}</view>
			<view class="msg">
				<text class="floatLeft">联系方式</text>
				<text class="floatRight">{{item.contact}}</text>
			</view>
			<view class="msg">
				<text class="floatLeft">宿舍号</text>
				<text class="floatRight">{{item.houseNumber}}</text>
			</view>
			<view class="msg">
				<text class="floatLeft">维修事宜</text>
				<text class="floatRight">{{item.matters}}</text>
			</view>
			<view class="msg">
				<text class="floatLeft">维修项目</text>
				<text class="floatRight">{{item.project}}</text>
			</view>
		</view>
		
	</div>
</template>

<script>
	const {getRepair} = require('../../utils/admin.js')
	export default {
		data() {
			return {
				grade:[]
			}
		},
		created() {
			this.getList();
		},
		methods:{
			getList(){
				getRepair().then(data=>{
					this.grade = data.data;
				})
			},
			forget(){
				uni.navigateTo({
					url: 'forget'
				});
			}
		}
	}
</script>

<style scoped src="../../static/css/grade.css"></style>
